﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WF_FinanceInfo.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.WF_FinanceInfo" %>

<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc2" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  
  <script type="text/javascript" src="../../Scripts/DatePicker.js">
 
  </script>
<script type="text/javascript">


    function onTextChange(sender) {
        if (sender.get_value() == "") {
            sender.set_text("");
        }
    }
    function openProjectDetails(id, name) {
        radopen("WF_ProjectLoan.aspx?id=" + id + "&Name=" + name, "ProjectDtls");
        return false;
    }
      
</script>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
    <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title="โครงการเงินกู้"
        width="800px"
        Height="500px"        
        Modal="true"
        behaviors="Close">
    </telerik:RadWindow>
</Windows>

        <Windows>
            <telerik:RadWindow 
                ID="RadWindow1"  
                DestroyOnClose = "true"               
                Modal ="true"                
                VisibleStatusbar ="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>


</telerik:RadWindowManager>
    
    <title>โครงการเงินกู้</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
      
    
      <asp:panel ID="Panel6" runat="server" >
        <table width="1000px" cellpadding="0" cellspacing="0">
        <tr>
            <td width="280" valign = "top">
                
                <!-- <uc2:user ID="user1" runat="server" /> -->
                
            </td>
            <td width="20" >
            
            
            </td>
            <td>
  <%--          <div class="moduleDivSlim700">
                    <div class="moduleDivBottom700">
        
                         <asp:Panel ID="Panel779" runat="server" Width="700px" ScrollBars="Auto">                          
                            <table align = "center" width = "650px">
                                    <tr>
                                        <td align="right" >
                                            &nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                        
                                       <td>
                                            &nbsp;</td>
                                    </tr>
                                </table>
                                
                
                        </asp:Panel>
                        
                                             </div>
                </div>--%>
            
            </td>

         
          </tr>
  </table>

        <table>
        <tr>
      
            <td colspan="3">
                <div class="moduleDivSlim1000x450">
                    <div class="moduleDivBottom1000">
                        <table align="center" width="980px">
                            <tr>
                                <td align="left" class="tableHeader">
                                    ข้อมูลสถาบันการเงิน</td>
                            </tr>
                        </table>
                        <table width="980px" align="center">
                            <tr>
                                <td>
                                    <asp:Panel ID="PanelGrid" runat="server" Height="350px" ScrollBars="Auto" 
                                        Width="980px">
                                        <telerik:RadGrid ID="RadGrid2" runat="server" AllowAutomaticDeletes="True" 
                                            AllowFilteringByColumn="True" AllowMultiRowEdit="True" 
                                            AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
                                            AutoGenerateColumns="False" EnableAJAX="True" EnableAJAXLoadingTemplate="True" 
                                            GridLines="None" OnItemCommand="RadGrid2_ItemCommand" 
                                            onitemdatabound="RadGrid2_ItemDataBound" Skin="Outlook" Width="970px"  
                                            onneeddatasource="RadGrid2_NeedDataSource">
                                            <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                                                ClientDataKeyNames="finance_seq" CommandItemDisplay="Top" 
                                                DataKeyNames="finance_seq" InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                                <CommandItemTemplate>
                                                    <table width="100%">
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                                                    CommandName="InitInsert" 
                                                                    Visible="<%# !RadGrid2.MasterTableView.IsItemInserted && RadGrid2.EditIndexes.Count <= 0 %>">
                                        <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                            style="border: 0px; vertical-align: middle;" /> เพิ่มข้อมูลสถาบันการเงิน</asp:LinkButton>
                                                                &nbsp;&nbsp;
                                                            </td>
                                                            <td align="right">
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </CommandItemTemplate>
                                                <RowIndicatorColumn>
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                                <ExpandCollapseColumn Visible="True">
                                                </ExpandCollapseColumn>
                                                <Columns>
                                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                                                        EditText="คลิกเพื่อแก้ไขข้อมูล">
                                                        <ItemStyle Width="15px" />
                                                    </telerik:GridEditCommandColumn>
                                                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                                                        ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                                        Text="คลิกเพื่อลบข้อมูล" UniqueName="column1">
                                                        <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10px" />
                                                    </telerik:GridButtonColumn>
                                                    
                                  <telerik:GridTemplateColumn
                                        DataField="finance_name" 
                                        HeaderText = "ชื่อสถาบันการเงิน"
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter="true" 
                                        CurrentFilterFunction="Contains" 
                                        ShowFilterIcon="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="targetControl" runat="server" 
                                        Text='<%# Eval("finance_name") %>' 
                                        OnClientClick='<%# string.Format("return openProjectDetails(\"{0}\",\"{1}\");"
                                                        , Eval("finance_seq"),Eval("finance_name")) %>'>
                                        </asp:LinkButton>                       
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="left"/>
                                    </telerik:GridTemplateColumn>                                
                                    
                                    <telerik:GridTemplateColumn 
                                        DataField="remarks" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderText="หมายเหตุ" 
                                        UniqueName="remarks">
                                         <ItemTemplate>
                                    <%# Eval("remarks")%> 
                                    </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="200px" />
                                                                     
                           
                                    </telerik:GridTemplateColumn>  
                                  </Columns>
                                                <EditFormSettings EditFormType="WebUserControl" 
                                                    UserControlName="../UserControls/WF_FinanceInfo.ascx">
                                                    <EditColumn UniqueName="EditCommandColumn1">
                                                    </EditColumn>
                                                </EditFormSettings>
                                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                            </MasterTableView>
                                            <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                                                EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                                                <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                                            </ClientSettings>
                                        </telerik:RadGrid>
                                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </td>
        </tr>
     
</table>
</asp:panel>

</asp:Content>
